<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>S110_nRF51822/Include/ble/softdevice/ble.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="alias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="alias.js"></script>

<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>


<script type="text/javascript">
  jQuery(document).ready(function () {
    if(gref){ // Number all _img and _table classes
      gref();
    }
  });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nRF51822 BLE SDK
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('ble_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">S110_nRF51822/Include/ble/softdevice/ble.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Copyright (c) 2011 Nordic Semiconductor. All Rights Reserved.</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * The information contained herein is confidential property of Nordic Semiconductor. The use,</span>
<a name="l00004"></a>00004 <span class="comment"> * copying, transfer or disclosure of such information is prohibited except by express written</span>
<a name="l00005"></a>00005 <span class="comment"> * agreement with Nordic Semiconductor.</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> */</span>
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef BLE_H__</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define BLE_H__</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;ble_ranges.h&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;ble_types.h&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;ble_gap.h&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;ble_l2cap.h&quot;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;ble_gattc.h&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;ble_gatts.h&quot;</span>
<a name="l00027"></a>00027 
<a name="l00031"></a>00031 <span class="keyword">enum</span>
<a name="l00032"></a>00032 {
<a name="l00033"></a><a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635a1c413c45622ed9c39d9e493bdcb7433b">00033</a>   <a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635a1c413c45622ed9c39d9e493bdcb7433b">SVC_BLE_EVT_GET</a>  = BLE_SVC_BASE,       
<a name="l00034"></a><a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635a66d2a4f6f7cbd2d514a2a2b65f466b2b">00034</a>   <a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635a66d2a4f6f7cbd2d514a2a2b65f466b2b">SVC_BLE_TX_BUFFER_COUNT_GET</a>,           
<a name="l00035"></a><a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635ae38be60149b831cf8de3d4977529f3fe">00035</a>   <a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635ae38be60149b831cf8de3d4977529f3fe">SVC_BLE_VS_UUIDS_ASSIGN</a>,               
<a name="l00036"></a><a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635afbf80f58c266ff61f94c75d647b33f92">00036</a>   <a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635afbf80f58c266ff61f94c75d647b33f92">SVC_BLE_VERSION_GET</a>                    
<a name="l00037"></a>00037 };
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 
<a name="l00043"></a>00043 <span class="keyword">enum</span>
<a name="l00044"></a>00044 {
<a name="l00045"></a><a class="code" href="group__ble__api.html#gga0411cd49bb5b71852cecd93bcbf0ca2da408a77f131a2d314fbf477cdb2d1e0f6">00045</a>   <a class="code" href="group__ble__api.html#gga0411cd49bb5b71852cecd93bcbf0ca2da408a77f131a2d314fbf477cdb2d1e0f6">BLE_EVT_TX_COMPLETE</a>  = BLE_EVT_BASE,  
<a name="l00046"></a>00046 };
<a name="l00047"></a>00047 
<a name="l00048"></a>00048 
<a name="l00052"></a>00052 <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00053"></a>00053 {
<a name="l00054"></a><a class="code" href="structble__evt__tx__complete__t.html#a20302e2c99a60d3f612dba57e3f6333b">00054</a>   uint8_t <a class="code" href="structble__evt__tx__complete__t.html#a20302e2c99a60d3f612dba57e3f6333b">count</a>;                        
<a name="l00055"></a>00055 } <a class="code" href="structble__evt__tx__complete__t.html" title="TX complete event.">ble_evt_tx_complete_t</a>;
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 
<a name="l00059"></a>00059 <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00060"></a>00060 {
<a name="l00061"></a><a class="code" href="structble__common__evt__t.html#a0d5ffe38d68e48d81e61fc6a4999ae68">00061</a>   uint16_t <a class="code" href="structble__common__evt__t.html#a0d5ffe38d68e48d81e61fc6a4999ae68">conn_handle</a>;                 
<a name="l00062"></a>00062   <span class="keyword">union</span>
<a name="l00063"></a>00063   {
<a name="l00064"></a><a class="code" href="structble__common__evt__t.html#a0d178c098a4dbbeb9a61cab6ec8c88eb">00064</a>     <a class="code" href="structble__evt__tx__complete__t.html" title="TX complete event.">ble_evt_tx_complete_t</a> <a class="code" href="structble__common__evt__t.html#a0d178c098a4dbbeb9a61cab6ec8c88eb">tx_complete</a>;  
<a name="l00065"></a>00065   } params;
<a name="l00066"></a>00066 } <a class="code" href="structble__common__evt__t.html" title="Event structure for events not associated with a specific function module.">ble_common_evt_t</a>;
<a name="l00067"></a>00067 
<a name="l00069"></a>00069 <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00070"></a>00070 {
<a name="l00071"></a><a class="code" href="structble__evt__hdr__t.html#a826314e7ea25d4267621899efe6859f9">00071</a>   uint16_t <a class="code" href="structble__evt__hdr__t.html#a826314e7ea25d4267621899efe6859f9">evt_id</a>;                      
<a name="l00072"></a><a class="code" href="structble__evt__hdr__t.html#ad197b4ddcfe9633c1eccb07cdae28f27">00072</a>   uint16_t <a class="code" href="structble__evt__hdr__t.html#ad197b4ddcfe9633c1eccb07cdae28f27">evt_len</a>;                     
<a name="l00073"></a>00073 } <a class="code" href="structble__evt__hdr__t.html" title="BLE Event header.">ble_evt_hdr_t</a>;
<a name="l00074"></a>00074 
<a name="l00076"></a>00076 <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00077"></a>00077 {
<a name="l00078"></a><a class="code" href="structble__evt__t.html#a50f33abba5627a26728ba30fffd9880a">00078</a>   <a class="code" href="structble__evt__hdr__t.html" title="BLE Event header.">ble_evt_hdr_t</a> <a class="code" href="structble__evt__t.html#a50f33abba5627a26728ba30fffd9880a">header</a>;                 
<a name="l00079"></a>00079   <span class="keyword">union</span>
<a name="l00080"></a>00080   {
<a name="l00081"></a><a class="code" href="structble__evt__t.html#ae7201ce55baba3aa29667aa148d71b12">00081</a>     <a class="code" href="structble__common__evt__t.html" title="Event structure for events not associated with a specific function module.">ble_common_evt_t</a> <a class="code" href="structble__evt__t.html#ae7201ce55baba3aa29667aa148d71b12">common_evt</a>;        
<a name="l00082"></a><a class="code" href="structble__evt__t.html#a2fd98f8868b9aea30d35bf71d41d646a">00082</a>     <a class="code" href="structble__gap__evt__t.html" title="GAP event callback event structure.">ble_gap_evt_t</a>   <a class="code" href="structble__evt__t.html#a2fd98f8868b9aea30d35bf71d41d646a">gap_evt</a>;            
<a name="l00083"></a><a class="code" href="structble__evt__t.html#ae0b5658039628a0a83a509ca34598ae9">00083</a>     <a class="code" href="structble__l2cap__evt__t.html" title="L2CAP event callback event structure.">ble_l2cap_evt_t</a> <a class="code" href="structble__evt__t.html#ae0b5658039628a0a83a509ca34598ae9">l2cap_evt</a>;          
<a name="l00084"></a><a class="code" href="structble__evt__t.html#a468600a2b024162cf1f553506663d9c2">00084</a>     <a class="code" href="structble__gattc__evt__t.html" title="GATTC event type.">ble_gattc_evt_t</a> <a class="code" href="structble__evt__t.html#a468600a2b024162cf1f553506663d9c2">gattc_evt</a>;          
<a name="l00085"></a><a class="code" href="structble__evt__t.html#a91857ca158f0c4e43f610068772c7d3d">00085</a>     <a class="code" href="structble__gatts__evt__t.html" title="GATT Server event callback event structure.">ble_gatts_evt_t</a> <a class="code" href="structble__evt__t.html#a91857ca158f0c4e43f610068772c7d3d">gatts_evt</a>;          
<a name="l00086"></a>00086   } evt;
<a name="l00087"></a>00087 } <a class="code" href="structble__evt__t.html" title="Common BLE Event type, wrapping the module specific event reports.">ble_evt_t</a>;
<a name="l00088"></a>00088 
<a name="l00089"></a>00089 
<a name="l00093"></a>00093 <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00094"></a>00094 {
<a name="l00095"></a><a class="code" href="structble__version__t.html#a69a5d880c0a3f52ef40d0df24b59380a">00095</a>   uint8_t   <a class="code" href="structble__version__t.html#a69a5d880c0a3f52ef40d0df24b59380a">version_number</a>;             
<a name="l00096"></a><a class="code" href="structble__version__t.html#a685ae33c442d30cc507fa5415f536e74">00096</a>   uint16_t  <a class="code" href="structble__version__t.html#a685ae33c442d30cc507fa5415f536e74">company_id</a>;                 
<a name="l00097"></a><a class="code" href="structble__version__t.html#a6d8e49abf0026c4c4751a34a21ae59ae">00097</a>   uint16_t  <a class="code" href="structble__version__t.html#a6d8e49abf0026c4c4751a34a21ae59ae">subversion_number</a>;          
<a name="l00098"></a>00098 } <a class="code" href="structble__version__t.html" title="Version Information.">ble_version_t</a>;
<a name="l00099"></a>00099 
<a name="l00100"></a>00100 
<a name="l00112"></a>00112 uint32_t SVCALL(<a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635a1c413c45622ed9c39d9e493bdcb7433b">SVC_BLE_EVT_GET</a>) <a class="code" href="group__ble__api.html#gab96bbfd85c2ab36e6cec85ef0e29de26" title="Get an event from the pending events queue.">ble_evt_get</a>(uint8_t* p_dest, uint16_t *p_len);
<a name="l00113"></a>00113 
<a name="l00114"></a>00114 
<a name="l00126"></a>00126 uint32_t SVCALL(<a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635a66d2a4f6f7cbd2d514a2a2b65f466b2b">SVC_BLE_TX_BUFFER_COUNT_GET</a>) <a class="code" href="group__ble__api.html#ga278e97b31059a569c22bb21a5fcba1b5" title="Get the total number of available transmission buffers available in BLE stack.">ble_tx_buffer_count_get</a>(uint8_t* p_count);
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 
<a name="l00142"></a>00142 uint32_t SVCALL(<a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635ae38be60149b831cf8de3d4977529f3fe">SVC_BLE_VS_UUIDS_ASSIGN</a>) <a class="code" href="group__ble__api.html#ga6266a237491ab1aab2b0c2d8881ad775" title="Assign Vendor Specific UUIDs.">ble_vs_uuids_assign</a>(uint16_t vs_uuid_count, <a class="code" href="structble__uuid128__t.html" title="128 bit UUID values.">ble_uuid128_t</a> const * const p_vs_uuids);
<a name="l00143"></a>00143 
<a name="l00144"></a>00144 
<a name="l00153"></a>00153 uint32_t SVCALL(<a class="code" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635afbf80f58c266ff61f94c75d647b33f92">SVC_BLE_VERSION_GET</a>) <a class="code" href="group__ble__api.html#gaff54ebdd02eb13571d4c1f316cbbfd3f" title="Get Version Information.">ble_version_get</a>(<a class="code" href="structble__version__t.html" title="Version Information.">ble_version_t</a> * p_version);
<a name="l00154"></a>00154 
<a name="l00155"></a>00155 <span class="preprocessor">#endif </span><span class="comment">/* BLE_H__ */</span>
<a name="l00156"></a>00156 
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>ble.h</b>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
      Copyright &copy 2006-2011 <a href="http://www.nordicsemi.no" style="text-decoration:none">Nordic Semiconductor</a>.
      All Rights Reserved.
      <a href="disclaimer.html">Disclaimer</a>
    </li>
   </ul>
 </div>


</body>
</html>
